package com.taobao.apiclient.exception;

import com.taobao.api.ApiException;

public class ApiClientException extends ApiException {
  /**
   * serialVersionUID
   */
  private static final long serialVersionUID = 8990506601970288217L;

  public ApiClientException() {
    super();
  }

  public ApiClientException(String msg) {
    super(msg);
  }

  private String subCode;
  private String subMsg;

  public ApiClientException(ApiException cause) {
    super(cause.getErrCode(), cause.getErrMsg());
  }

  public ApiClientException(String errorCode, String errorMsg, String subCode, String subMsg) {
    super(errorCode, errorMsg);
    this.subCode = subCode;
    this.subMsg = subMsg;
  }

  public ApiClientException(String msg, Throwable cause) {
    super(msg, cause);
  }

  public String getSubCode() {
    return subCode;
  }

  public void setSubCode(String subCode) {
    this.subCode = subCode;
  }

  public String getSubMsg() {
    return subMsg;
  }

  public void setSubMsg(String subMsg) {
    this.subMsg = subMsg;
  }

}
